manifest {
  nextflowVersion = '!>=20.12.1-edge'
}

// ADAPT rootDir ACCORDING TO RELATIVE PATH WITHIN PROJECT
params {
  rootDir = "$projectDir/../../../.."
}

def viash_temp = System.getenv("VIASH_TEMP") ?: "/tmp/"
def rootDir = java.nio.file.Paths.get(params.rootDir).toAbsolutePath().normalize().toString()
srcDir = "$rootDir/src"
targetDir = "$rootDir/target/nextflow"

includeConfig "$targetDir/common_datasets/download_10x_dataset/nextflow.config"
includeConfig "$targetDir/common_datasets/simulate_dyngen_dataset/nextflow.config"
includeConfig "$targetDir/common_datasets/download_azimuth_dataset/nextflow.config"
includeConfig "$targetDir/common_datasets/download_totalvi_spleen_lymph/nextflow.config"
includeConfig "$targetDir/common_datasets/download_totalvi_10x_dataset/nextflow.config"
includeConfig "$targetDir/common_datasets/download_babel_dataset/nextflow.config"
includeConfig "$targetDir/common_process_dataset/quality_control/nextflow.config"
includeConfig "$targetDir/common_process_dataset/normalize/nextflow.config"
includeConfig "$targetDir/common_process_dataset/split_traintest/nextflow.config"
includeConfig "$targetDir/common_process_dataset/pseudotime_order/nextflow.config"
includeConfig "$targetDir/common_process_dataset/simulate_batch/nextflow.config"
includeConfig "$targetDir/common_process_dataset/cluster_celltype/nextflow.config"
includeConfig "$srcDir/common/workflows/resource_labels.config"

docker {
  runOptions = "-v $rootDir:$rootDir -v $viash_temp:$viash_temp"
}

process {
  errorStrategy = 'ignore'
  container = 'nextflow/bash:latest'
}